package cn.edu.nju.software.cdiy.service;

import java.util.List;
import java.util.Map;

import cn.edu.nju.software.cdiy.bean.Scheme;
import cn.edu.nju.software.cdiy.util.Item;
import cn.edu.nju.software.cdiy.util.SortType;
import cn.edu.nju.software.cdiy.util.SortWay;

public interface SchemeService {

	public Scheme save(Scheme s);

	public boolean deleteScheme(long id);

	public Scheme getSchemeById(Long id);

	public List<Scheme> getAllScheme();

	public List<Scheme> searchSchemeByName(String name);

	public List<Scheme> getFourScheme(int hardwareId, String hardwareType);

	public Map<String,List<Item>> getFilterBoard();
	
	public List<Scheme> filter(List<Integer> brandList, List<Integer> priceList,
			List<Integer> typeList, SortType st, SortWay sw, int page);

	public long getFilterResultLength(List<Integer> brandList, List<Integer> priceList, List<Integer> typeList);
	
	Map<String, List<Scheme>> getBrandRankLists();

	Map<String, List<Scheme>> getPriceRankLists();
	
	Map<String, List<Scheme>> getTypeRankLists();

	List<Scheme> getSaleRankList();

	List<Scheme> getTimeRankList();
	
	Map<String,List<Scheme>> getRelatedSchemes(Scheme scheme);
	
}
